package com.oocl.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.oocl.dao.MerchantsDao;
import com.oocl.dao.base.BaseDao;
import com.oocl.entity.Merchants;
import com.oocl.service.MerchantsService;

@Service(value="merchantsService")
public class MerchantsServiceImpl implements MerchantsService {

	@Resource(name="merchantsDao")
	private MerchantsDao merchantsDao;
	
	@Resource(name="baseDao")
	private BaseDao baseDao;
	
	@Override
	public Merchants loadMerchantsByIcnum(String icnum) {
		// TODO Auto-generated method stub
		Merchants merchants=new Merchants();
		merchants=merchantsDao.findmerchantsByIcnum(icnum);
		return merchants;
	}

	@Override
	public Merchants loadMerchantsByMid(String mid) {
		// TODO Auto-generated method stub
		Merchants merchants=new Merchants();
		merchants=(Merchants) baseDao.find(Merchants.class, mid);
		return merchants;
	}

}
